

import  axios from "axios";

// const service = axios.create({
    // process.env.NODE_ENV  === 'development'  //判断是否开发环境
    // baseURL:"路径",
    // timeout:3000
// })


axios.interceptors.request.use(config=>{

    return config
})

axios.interceptors.response.use(config=>{

    return config
})

//params  ...{url:"dizhi", method:"post",data:{数据}}
let  Request =(params)=>{
    return  new Promise((resolve,reject)=>{
        axios({
           ...params 
        })
        .then((res)=>{
            resolve(res)
        })
        .catch((error)=>{
            reject(error)
        })
    })
}

export { Request }